package cn.edu.xaut.mybatisers.mall.Service;

import cn.edu.xaut.mybatisers.mall.Entity.*;
import cn.edu.xaut.mybatisers.mall.Exception.ExceptionEntity.LoginException;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.jdbc.SQL;

import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.sql.SQLException;
import java.util.List;

public interface AdminService {
    Admin login(Admin admin, String verifyCode, HttpServletResponse response, HttpSession session) throws LoginException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException, SQLException;
    Boolean alterBill(Bill bill) throws SQLException;
    PageInfo<Bill> findBills(Bill bill, String accountMember, int pageNum, int pageSize) throws SQLException;
    Boolean addCommodity(Commodity commodity, int admin_id) throws SQLException, IOException;
    int deleteCommodity(Commodity commodity) throws SQLException;
    Commodity alterCommodity(Commodity commodity) throws SQLException;

    PageInfo<Commodity> findCommodity(Commodity commodity, int pageNum, int pageSize) throws SQLException, IOException;
    Boolean addCommodityCategory(CommodityCategory commodityCategory) throws SQLException;
    CommodityCategory alterCommodityCategory(CommodityCategory commodityCategory) throws SQLException;
    List<CommodityCategory> findCommodityCategory() throws SQLException;
    int deleteCommodityCategory(CommodityCategory commodityCategory) throws SQLException;
}
